package edu.guet.Factory.AbstractFactory.PizzaStroe;

import edu.guet.Factory.AbstractFactory.Ingredient.PizzaIngredientFactory;
import edu.guet.Factory.AbstractFactory.Ingredient.factory.NYPizzaIngredientFactory;
import edu.guet.Factory.AbstractFactory.Pizza.*;
import edu.guet.Factory.PizzaType;

/**
 * Created by Caesar on 2017/5/6.
 */
public class NYStylePizzaStroe extends edu.guet.Factory.AbstractFactory.PizzaStroe.PizzaStroe {
    @Override
    public Pizza creatPizza(PizzaType type) {
        PizzaIngredientFactory factory = new NYPizzaIngredientFactory();
        Pizza pizza = null;
        switch (type) {
            case cheese:
                pizza = new CheesePizza(factory, "NY Style Sauce and Cheese Pizza");
                break;
            case pepperoni:
                pizza = new PepperoniPizza(factory, "NY Style Pepperoni Pizza");
                break;
            case clam:
                pizza = new ClamPizza(factory, "NY Style Clam Pizza");
                break;
            case veggie:
                pizza = new VeggiePizza(factory, "NY Style Veggie Pizza");
                break;
        }
        return pizza;
    }
}
